package Vista;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JScrollPane;
import javax.swing.JTable;

import javax.swing.WindowConstants;
import javax.swing.border.BevelBorder;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class frmAlquileres extends javax.swing.JFrame {
	private JButton btnConfirmarReserva;
	private JLabel lblAlquileres;
	private JButton btnDevolver;
	private JButton btnNuevaReserva;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				frmAlquileres inst = new frmAlquileres();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public frmAlquileres() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			{
				btnConfirmarReserva = new JButton();
				getContentPane().add(btnConfirmarReserva);
				btnConfirmarReserva.setText("Confirmar Reserva");
				btnConfirmarReserva.setBounds(12, 91, 149, 74);
				btnConfirmarReserva.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent evt) {
						btnConfirmarReservaActionPerformed(evt);
					}
				});
			}
			{
				lblAlquileres = new JLabel();
				getContentPane().add(lblAlquileres);
				lblAlquileres.setText("Alquileres");
				lblAlquileres.setBounds(195, 26, 91, 58);
				lblAlquileres.setFont(new java.awt.Font("Segoe UI",0,20));
			}
			{
				btnNuevaReserva = new JButton();
				getContentPane().add(btnNuevaReserva);
				btnNuevaReserva.setText("Nuevo Alquiler");
				btnNuevaReserva.setBounds(166, 90, 161, 75);
				btnNuevaReserva.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent evt) {
						btnNuevaReservaActionPerformed(evt);
					}
				});
			}
			{
				btnDevolver = new JButton();
				getContentPane().add(btnDevolver);
				btnDevolver.setText("Devolver Automovil");
				btnDevolver.setBounds(332, 91, 169, 73);
				btnDevolver.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent evt) {
						btnDevolverActionPerformed(evt);
					}
				});
			}
			pack();
			this.setSize(528, 257);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	private void btnConfirmarReservaActionPerformed(ActionEvent evt) {
		frmConfirmarAlquiler frm = new frmConfirmarAlquiler();
		frm.setLocationRelativeTo(null);
		frm.setVisible(true);
		
	}
	
	private void btnDevolverActionPerformed(ActionEvent evt) {
		frmDevolverAutomovil frm = new frmDevolverAutomovil();
		frm.setLocationRelativeTo(null);
		frm.setVisible(true);
	}
	
	private void btnNuevaReservaActionPerformed(ActionEvent evt) {
		frmAlquiler frm = new frmAlquiler();
		frm.setLocationRelativeTo(null);
		frm.setVisible(true);		
	}

}
